<template>
    <div :key="dealWithKey">
        <!-- 001003039 AUISHEOBJIRORVKKZP -->
        <dealWith003002 v-if="parameterData.sqsxbm == '001003002'" ref="dealWithRef" :parameter="parameterData" @successReturn="successReturn" @updatedSuccess="updatedSuccess"/>
        <dealWith003004 v-else-if="parameterData.sqsxbm == '001003004'" ref="dealWithRef" :parameter="parameterData" @successReturn="successReturn" @updatedSuccess="updatedSuccess"/>
        <dealWith003006 v-else-if="parameterData.sqsxbm == '001003006'" ref="dealWithRef" :parameter="parameterData" @successReturn="successReturn" @updatedSuccess="updatedSuccess"/>
        <dealWith003003 v-else-if="parameterData.sqsxbm == '001003003'" ref="dealWithRef" :parameter="parameterData" @successReturn="successReturn" @updatedSuccess="updatedSuccess"/>
        <dealWith003010 v-else-if="parameterData.sqsxbm == '001003010'" ref="dealWithRef" :parameter="parameterData" @successReturn="successReturn" @updatedSuccess="updatedSuccess"/>
        <dealWith003025 v-else-if="parameterData.sqsxbm == '001003025'" ref="dealWithRef" :parameter="parameterData" @successReturn="successReturn" @updatedSuccess="updatedSuccess"/>
        <dealWith003008 v-else-if="parameterData.sqsxbm == '001003008'" ref="dealWithRef" :parameter="parameterData" @successReturn="successReturn" @updatedSuccess="updatedSuccess"/>
        <dealWith003058 v-else-if="parameterData.sqsxbm == '001003058'" ref="dealWithRef" :parameter="parameterData" @successReturn="successReturn" @updatedSuccess="updatedSuccess"/>
        <dealWith003026 v-else-if="parameterData.sqsxbm == '001003026'" ref="dealWithRef" :parameter="parameterData" @successReturn="successReturn" @updatedSuccess="updatedSuccess"/>
        <dealWith003019 v-else-if="parameterData.sqsxbm == '001003019'" ref="dealWithRef" :parameter="parameterData" @successReturn="successReturn" @updatedSuccess="updatedSuccess"/>
        <dealWith003039 v-else-if="parameterData.sqsxbm == '001003039'" ref="dealWithRef" :parameter="parameterData" @successReturn="successReturn" @updatedSuccess="updatedSuccess"/>
        <dealWith v-else ref="dealWithRef" :parameter="parameterData" @successReturn="successReturn" @updatedSuccess="updatedSuccess"/>
    </div>
</template>
<script>
import dealWith from './dealWith.vue'
import dealWith003004 from './dealWith-003004.vue'
import dealWith003006 from './dealWith-003006.vue'
import dealWith003002 from './dealWith-003002.vue'
import dealWith003003 from './dealWith-003003.vue'
import dealWith003010 from './dealWith-003010.vue'
import dealWith003025 from './dealWith-003025.vue'
import dealWith003008 from './dealWith-003008.vue'
import dealWith003058 from './dealWith-003058.vue'
import dealWith003026 from './dealWith-003026.vue'
import dealWith003019 from './dealWith-003019.vue'
import dealWith003039 from './dealWith-003039.vue'
import {getSqsxBm} from './service/index.js'
export default {
    components:{
        dealWith,
        dealWith003004,
        dealWith003006,
        dealWith003002,
        dealWith003003,
        dealWith003010,
        dealWith003025,
        dealWith003008,
        dealWith003058,
        dealWith003026,
        dealWith003019,
        dealWith003039,
    },
    props:{

    },
    data(){
        return{
            parameterData:{},
            dealWithKey:null,
        }
    },
    watch:{

    },
    mounted(){
        
    },
    methods:{
        getDatas(val){
            this.$store.dispatch('UpdateSpinningPrice', {key:true,stateKey:'modalSpinningPrice'})
            getSqsxBm({sqsxid:val.sqsxid}).then(res=>{
                if(res.code == 200){
                    val['sqsxbm'] = res.result
                    //console.log('获取到什么啊！',val)
                    this.parameterData = val
                    this.dealWithKey = Date.now()
                    this.$nextTick(()=>{
                        this.$store.dispatch('UpdateSpinningPrice', {key:true,stateKey:'modalSpinningPrice'})
                        this.$refs.dealWithRef.getDatas(val)
                    })
                }else{
                    this.$message.warning(res.message)
                }
            })
            
        },
        updatedSuccess(){
            this.$emit('updatedSuccess')
        },
        successReturn(val){
            this.$emit('successReturn',val)
        }
    }
}
</script>